package compiles

type ojCompiles struct {
	Luas []string
}

func NewOjCompiiles() ojCompiles {

	o := ojCompiles{}

	o.Luas = initLanguages()

	return o
}

//获取所有支持的语言
func initLanguages() []string {
	Luas := []string{"Java", "Csharp", "C", "Python3"}
	return Luas
}

//Code 要执行的代码
//CodeLanguage 执行的语言
func (oj *ojCompiles) Compiles(Code string, CodeLanguage string) string {
	impe := NewImple()
	switch CodeLanguage {
	case "C":
		return impe.GccImple(Code)
	}
	return ""
}
